<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require './src/Exception.php';
require './src/PHPMailer.php';
require './src/POP3.php';
                          // Passing `true` enables exceptions

$hostname = '{pop3.mxhichina.com:110/pop3}INBOX';
$username = 'mail@circledesign.cn';
$password = 'Kk98154981';

$inbox = imap_open($hostname, $username, $password);

if ($inbox) {
    #$emails = imap_search($inbox, 'ALL',"UNSEEN");
    $emails = imap_search($inbox, 'SUBJECT "通知"');


    print_r($emails);

    foreach ($emails as $email_number)
    {
        echo $header = imap_fetchheader($inbox, $email_number);
        echo "<br/>";

        echo $body = imap_body($inbox, $email_number);
        echo "<br/>";echo "<br/>";echo "<br/>";
        // 处理邮件头部和内容
        // ...
    }



    imap_close($inbox);
}


?>